{extend name="common/base"/}
<!-- 主体 -->
{block name="body"}
<form class="layui-form p-3">
	<table class="layui-table layui-table-form">
		<tr >
			<td class="layui-td-gray-2"  colspan="6" style="text-align: center;font-weight: bold;font-size: 20px;">乐&nbsp&nbsp&nbsp天</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">平台佣金<font>*</font>
			</td>
			<td>
				<input type="hidden" name="id" value="{$id}">
				<input type="text"  name="platform_commission" lay-verify="required" autocomplete="off" placeholder="请输入平台佣金"
					lay-reqText="请输入平台佣金" class="layui-input" {notempty name="$config.platform_commission" }
					value="{$config.platform_commission}" {/notempty}>
			</td>
			<td class="layui-td-gray">广告<font>*</font>
			</td>
			<td>
				<input type="text" name="advertising_expenses" lay-verify="required" autocomplete="off" placeholder="请输入广告费用"
					lay-reqText="请输入广告费用" class="layui-input" {notempty name="$config.advertising_expenses" } value="{$config.advertising_expenses}"
					{/notempty}>
			</td>
			<td  class="layui-td-gray">店主抽佣</td>
			<td>
				<input type="text" name="shop_commission" lay-verify="required" autocomplete="off" placeholder="请输入店主抽佣"
					   lay-reqText="请输入店主抽佣" class="layui-input" {notempty name="$config.shop_commission" } value="{$config.shop_commission}"
					   {/notempty}>
			</td>
		</tr>
		<tr >
			<td class="layui-td-gray-2"  colspan="6" style="text-align: center;font-weight: bold;font-size: 20px;">中&nbsp国</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">平台佣金<font>*</font>
			</td>
			<td>
				<input type="text" name="platform_commission2" lay-verify="required" autocomplete="off" placeholder="请输入平台佣金"
					   lay-reqText="请输入平台佣金" class="layui-input" {notempty name="$config.platform_commission2" }
					   value="{$config.platform_commission2}" {/notempty}>
			</td>
			<td class="layui-td-gray">广告<font>*</font>
			</td>
			<td>
				<input type="text" name="advertising_expenses2" lay-verify="required" autocomplete="off" placeholder="请输入广告费用"
					   lay-reqText="请输入广告费用" class="layui-input" {notempty name="$config.advertising_expenses2" } value="{$config.advertising_expenses2}"
					   {/notempty}>
			</td>
		</tr>
	</table>

	<div class="py-3">
		<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	</div>
</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
	const moduleInit = ['tool'];
	function gouguInit() {
		var form = layui.form, tool = layui.tool, upload = layui.upload;
		//监听提交
		form.on('submit(webform)', function (data) {
			let callback = function (e) {
				layer.msg(e.msg);
				if (e.code == 0) {
					parent.layui.tool.close(1000);
				}
			}
			tool.post("/admin/conf/edit", data.field, callback);
			return false;
		});


	}
</script>
{/block}
<!-- /脚本 -->